package com.usian.search.controller;

import com.usian.api.search.ApAssociateWordsControllerApi;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.search.dto.UserSearchDto;
import com.usian.search.service.ApAssociateWordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @Auther:ASS
 * @Date:2023/3/9 20:34
 */
@RestController
@RequestMapping("/api/v1/associate")
public class ApAssociateWordsController implements ApAssociateWordsControllerApi {


    @Autowired
    private ApAssociateWordsService apAssociateWordsService;

    /**
     * 联想词
     *
     * @param dto
     * @return
     */
    @Override
    @PostMapping("/search")
    public ResponseResult search(UserSearchDto dto) {
        return apAssociateWordsService.search(dto);
    }
}
